<UserControl x:Class="WPFtextEffect.UserControl1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     Background="SteelBlue">
  <UserControl.Resources>

    <!-- Brush Resource -->
    <DrawingBrush x:Key="MyWireBrushResource"
      Viewport="0,0,10,10" ViewportUnits="Absolute" TileMode="Tile">
      <DrawingBrush.Drawing>
        <DrawingGroup>
          <DrawingGroup.Children>
            <GeometryDrawing Geometry="M0,0 L1,0 1,0.1, 0,0.1Z" Brush="#66CCCCFF" />
            <GeometryDrawing Geometry="M0,0 L0,1 0.1,1, 0.1,0Z" Brush="#66CCCCFF" />
          </DrawingGroup.Children>
        </DrawingGroup>
      </DrawingBrush.Drawing>
    </DrawingBrush>

  </UserControl.Resources>
    <Grid Name ="MaGrille">
        <StackPanel Margin="40">
          <Border Name="TextBorder" HorizontalAlignment="Center"
            VerticalAlignment="Center" Background="{StaticResource MyWireBrushResource}">
            <TextBlock
              FontSize="60"
              Margin="50"
              Foreground="White">
              Intégration WPF dans MFC

              <TextBlock.TextEffects>
                <!-- The TextEffect to animate. -->
                <TextEffect PositionCount="1" x:Name="MyTextEffect">
                  <TextEffect.Transform>
                    <RotateTransform x:Name="TextEffectRotateTransform"
                      Angle="0" CenterX="10" CenterY="10" />
                  </TextEffect.Transform>
                </TextEffect>
              </TextBlock.TextEffects>

              <TextBlock.Triggers>
                <EventTrigger RoutedEvent="TextBlock.Loaded">
                  <EventTrigger.Actions>
                    <BeginStoryboard>
                      <Storyboard>
                        <ParallelTimeline RepeatBehavior="Forever">

                          <!-- Animates the angle of the RotateTransform
                       applied to the TextEffect. -->
                          <DoubleAnimation
                            Storyboard.TargetName="TextEffectRotateTransform"
                            Storyboard.TargetProperty="Angle"
                            From="0"
                            To="360"
                            Duration="00:00:0.75"
                            BeginTime="0:0:0.25" />
                        </ParallelTimeline>

                        <!-- Animates the horizontal center of the RotateTransform
                     applied to the TextEffect. -->
                        <DoubleAnimation
                          From="30"
                          To="370"
                          Duration="00:00:13"
                          RepeatBehavior="Forever"
                          AutoReverse="True"
                          Storyboard.TargetName="TextEffectRotateTransform"
                          Storyboard.TargetProperty="CenterX" />

                        <!-- Animates the position of the TextEffect. -->
                        <Int32AnimationUsingKeyFrames
                          Storyboard.TargetName="MyTextEffect"
                          Storyboard.TargetProperty="PositionStart"
                          Duration="0:0:13"
                          AutoReverse="True"
                          RepeatBehavior="Forever">
                          <Int32AnimationUsingKeyFrames.KeyFrames>
                            <DiscreteInt32KeyFrame Value="0" KeyTime="0:0:0" />
                            <DiscreteInt32KeyFrame Value="1" KeyTime="0:0:1" />
                            <DiscreteInt32KeyFrame Value="2" KeyTime="0:0:2" />
                            <DiscreteInt32KeyFrame Value="3" KeyTime="0:0:3" />
                            <DiscreteInt32KeyFrame Value="4" KeyTime="0:0:4" />
                            <DiscreteInt32KeyFrame Value="5" KeyTime="0:0:5" />
                            <DiscreteInt32KeyFrame Value="6" KeyTime="0:0:6" />
                            <DiscreteInt32KeyFrame Value="7" KeyTime="0:0:7" />
                            <DiscreteInt32KeyFrame Value="8" KeyTime="0:0:8" />
                            <DiscreteInt32KeyFrame Value="9" KeyTime="0:0:9" />
                            <DiscreteInt32KeyFrame Value="10" KeyTime="0:0:10" />
                            <DiscreteInt32KeyFrame Value="11" KeyTime="0:0:11" />
                            <DiscreteInt32KeyFrame Value="12" KeyTime="0:0:12" />
                          </Int32AnimationUsingKeyFrames.KeyFrames>
                        </Int32AnimationUsingKeyFrames>
                      </Storyboard>
                    </BeginStoryboard>
                  </EventTrigger.Actions>
                </EventTrigger>
              </TextBlock.Triggers>
            </TextBlock>

          </Border>
        </StackPanel>
      <Button Height="23"
             HorizontalAlignment="Left"
             Margin="40,0,0,7.80333333333334"
             Name="button1" VerticalAlignment="Bottom"
             Width="75">Clicquez</Button>
    <TextBox Height="26" HorizontalAlignment="Left" Margin="141,0,0,6.80333333333334" Name="textBox1" VerticalAlignment="Bottom" Width="161" ToolTipService.HasDropShadow="False"></TextBox>
    <TextBox Height="26" Margin="321,0,404.183333333333,7.80333333333334" VerticalAlignment="Bottom" x:XmlAttributeProperties.XmlSpace="preserve"></TextBox>
  </Grid>

  </UserControl>
